import {init} from 'snabbdom/build/package/init'
import {h} from 'snabbdom/build/package/h'
import {thunk} from 'snabbdom/build/package/thunk'
console.log(h,thunk,init)

let patch = init([])

let vnode = h('div#containter',[h('h1','Hello Snabbdom'),h('p','helloP 标签')])

let app = document.querySelector('#app')

let oldVnode = patch(app,vnode)

setTimeout(()=>{
    let vnode = h('div#containter',[h('h1','Hello world'),h('p','helloP')])
    patch(oldVnode,vnode)

    //清空
    patch(oldVnode, h('!'))
},2000)